package elibrary;
import java.sql.*;

public class DaoConnection {
	
	
	
	//a static type connection object is created so that it can be accessed from the static method
	
	static Connection con;
    public static Connection getcon(String connectURL, String DBuser, String DBpass){
        con=null;
        try{
        	
        	//the connection is made to the database
        	
        	Class.forName("com.ibm.db2.jcc.DB2Driver");
            con = DriverManager.getConnection(connectURL, DBuser, DBpass);

        }
        catch(Exception e){
            e.printStackTrace();
        }
        return con;
    }

}

